import $axios from './index.js'

function domainList(data) {
  const url = '/domain/list'
  return $axios.get(url, data)
}
function addDomain(data) {
  const url = '/domain/add'
  return $axios.post(url, data)
}
function editDomain(data) {
  const url = '/domain/edit'
  return $axios.post(url, data)
}

function deleteDomain(data) {
  const url = '/domain/del'
  return $axios.post(url, data)
}

function updateDomain(data) {
  const url = '/domain/whois'
  return $axios.post(url, data, 10000)
}

export default {
  domainList,
  addDomain,
  editDomain,
  deleteDomain,
  updateDomain
}
